<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>[attribute!=value]</title>
<meta name="keywords" content="jQuery 1.2 API Reference,Visual jQuery 1.2,jQuery doc,jQuery API,jQuery,jQuery 1.2 API 参考文档中文版,中文版" />
<meta name="description" content="jQuery 1.2 API 文档中文版，提供最新版 jQuery 开发帮助。" />
<link rel="stylesheet" type="text/css" href="../../style/jqueryapi.css" />
<script type="text/javascript" src="../../style/lib/jquery126.js"></script>
 </script>
<script type="text/javascript" src="../../style/jqueryapi.js"></script>
<link rel="shortcut icon" href="../../style/img/favicon.ico" />
</head>
<body>
<div id="topnav">
		<a href="http://www.jQuery.com/" title="jQuery官网" target="_blank" class="topnav">jQuery官网</a>
	<span class="topnav">|</span>
	<a href="http://jquery.org.cn/" title="jQuery中文网站" target="_blank" class="topnav">jQuery中文网站</a>
	<span class="topnav">|</span>
	<a href="http://www.cn-cuckoo.com/" title="1.1版译者" target="_blank" class="topnav">为之漫笔</a>
	<span class="topnav">|</span>
	<a href="http://shawphy.com/" title="1.2版翻译整理者" target="_blank" class="topnav">Shawphy</a>
    <span class="topnav">|</span>
	<a href="http://www.51toria.cn" title="CHM文档制作者:一揪" target="_blank" class="topnav">CHM文档制作者</a> 
	<span class="topnav">|</span>
	<a href="http://dl.getdropbox.com/u/81097/jQueryAPI_CHM.CHM" title="" target="_blank" class="topnav">CHM最新版本下载</a> 
</div>
<hr style="color:#595959;" />

<div class="content">
				<h1>[attribute!=value]</h1>
				<div class="desc">匹配所有含有指定的属性，但属性不等于特定值的元素。<div class="longdesc">在jQuery 1.3之前是这样的："匹配那些没有指定的属性的元素，或者指定的属性不等于特定值的元素。"，这等价于:not([attr=value])</div></div> <hr /> <div class="desc">Matches elements that have the specified attribute but not with a certain value.<div class="longdesc">
					Prior to jQuery 1.3 the selector worked differently: "Matches elements that either don't have the specified attribute or do have the specified attribute but not with a certain value." That functionality is equivalent to :not([attr=value]).
				</div></div>
				<h2>返回值</h2>
				<p class="indent">Array&lt;Element&gt;</p>
				<h2>参数</h2>
				<p class="indent"><strong>attribute </strong>(String) : 属性名</p>
				<p class="indent"><strong>value </strong>(String) : 属性值。引号在大多数情况下是可选的。但在遇到诸如属性值包含"]"时，用以避免冲突。</p>
				<h2>示例</h2>
				<p class="indent">
					查找所有 name 属性不是 newsletter 的 input 元素
				</p>
				<p class="indent"><strong>HTML 代码:</strong></p>
				<div class="code">
					&lt;input type="checkbox" name="newsletter" value="Hot Fuzz" /&gt;<br/>
&lt;input type="checkbox" name="newsletter" value="Cold Fusion" /&gt;<br/>
&lt;input type="checkbox" name="accept" value="Evil Plans" /&gt; 
				</div>
				<p class="indent"><strong>jQuery 代码:</strong></p>
				<div class="code">
					$("input[name!='newsletter']").attr("checked", true); 
				</div>
				<p class="indent"><strong>结果:</strong></p>
				<div class="code">
					[ &lt;input type="checkbox" name="accept" value="Evil Plans" checked="true" /&gt; ] 
				</div>
			</div>

</body>
</html>
